CFLAGS  = -fpermissive -w
LFLAGS  =
CC      = g++
RM      = /bin/rm -rf
AR      = ar rcs
RANLIB  = ranlib

LIBRARY = librvm.a

LIB_SRC = rvm.C



run : compile RVMEXE 
	./RVMEXE

use : 
	$(CC) $(CFLAGS) -o RVMEXE $(ARG) librvm.a
	./RVMEXE

compile :clean $(ARG) $(LIBRARY)
	$(CC) $(CFLAGS) -o RVMEXE $(ARG) $(LIBRARY)

library : $(LIBRARY)

$(LIBRARY): $(LIB_OBJ) rvm.o
	$(AR) $(LIBRARY) rvm.o
	$(RM) *.o

rvm.o : $(LIB_SRC)
	$(CC) -c $(CFLAGS) $(LIB_SRC) -o rvm.o



clean:
	$(RM) $(LIBRARY)
	$(RM) *.o
#	- kill -9 `ps -a | grep RVMEXE | cut -d " " -f 2`
#	- kill -9 `ps -a | grep RVMEXE | cut -d " " -f 1`
	$(RM) RVMEXE
